=== SYNOPSIS ===
{{{
#include <xp/sys/utl.h>

int xp_getsysinfo (xp_sysinfo_t* mem);
}}}

=== DESCRIPTION ===
'''''xp_getsysinfo()''''' returns the system information in the following structure:
{{{
typedef struct xp_sysinfo_t xp_sysinfo_t;

struct xp_sysinfo_t
{
	xp_size_t ncpus;  /* number of processors */
	xp_time_t uptime; /* milliseconds since system boot */
};
}}}

=== RETURN VALUE ===
0 is returned on success while -1 is returned on error.

=== EXAMPLE ===
{{{
#include <xp/sys/utl.h>
#include <xp/bas/stdio.h>

int xp_main ()
{
	xp_sysinfo_t info;

	if (xp_getsysinfo(&info) == -1) {
		xp_fprintf (xp_stderr, XP_TEXT("cannot get sysinfo\n"));
		return -1;
	}

	xp_printf (XP_TEXT("ncpus: %lu\n"), (unsigned long)info.ncpus);
	xp_printf (XP_TEXT("uptime: %ld secs\n"), (long)info.uptime / 1000);

	return 0;
}
}}}
